package cn.itcast.nems.studentrecord.web.vo.query;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
public class JournalRepeatVO implements Serializable {
    /**
     * 主键ID;前缀+6位随机字符（大写字母+数字），示例：CD-I2Z8D8
     */
    private String id;

    /**
     * 学员ID
     */
    private Integer studentId;

    /**
     * 学生姓名
     */
    private String studentName ;
    /**
     * 学号
     */
    private String studentNo ;

    /**
     * 审批单ID
     */
    private String formId  ;

    /**
     * 业务实际办理日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime bizDate;

    /**
     * 原学籍ID
     */
    private String originStudentRecordId;

    /**
     * 原班级ID
     */
    private Integer originClazzId;

    /**
     * 原班级名称
     */
    private String originClazzName;

    /**
     * 原学籍的出班日期
     */
    private LocalDate originClazzOutDate;

    /**
     * 出班情况（结课前重读和结课后重读）  SETTLE_BEFORE("结课前重读"), SETTLE_AFTER("结课后重读");
     */
    private String originClazzOutType ;

    /**
     * 重读到的班级ID
     */
    private Integer targetClazzId;

    /**
     * 重读到的班级名称
     */
    private String targetClazzName;

    /**
     * 重读到的班级进班日期
     */
    private LocalDate targetClazzInDate;

    /**
     * 重读到的班级执行价格
     */
    private BigDecimal targetClazzPrice;

    /**
     * 重读金额;无重读费用时，可以为零
     */
    private BigDecimal amount;

    /**
     * 重读原因CODE;来自字典表
     */
    private String reasonCode;

    /**
     * 重读原因说明;来自字典表
     */
    private String reasonDescription;

    /**
     * 状态;枚举值：草稿｜DRAFT、待审批｜PENDING、审批中｜APPROVING、审批未通过｜REJECTED、已完成｜FINISHED
     */
    private String state;

    /**
     * 备注
     */
    private String remark;

    /**
     * 特殊申请;枚举值：非特殊｜0、特殊｜1
     */
    private Boolean specialFlag;

    /**
     * 重读生成的学籍ID;在审批通过，生成订单后更新
     */
    private String studentRecordId;

    /**
     * 重读生成的订单ID;在审批通过，生成订单后更新
     */
    private String orderId;
    /**
     * 创建人
     */
    private String createdBy;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime createdDatetime;

    private String schoolId;
    private String schoolName;
    private String modelId;
    private String modelName;
    private String subjectId;
    private String subjectName;
    private String classTypeId;
    private String classTypeName;

    /**
     * 转出班级预计结课时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateSerializer.class)
    private LocalDate originPredictionGraduationDate ;
    /**
     * 重读班级预计结课时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateSerializer.class)
    private LocalDate targetPredictionGraduationDate ;


    /**
     * 原班级学籍的进班时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateSerializer.class)
    private LocalDate originStudentRecordInDate;

    /**
     * 转出班的开班时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateSerializer.class)
    private LocalDate originClazzStartDate  ;
    /**
     * 转入班开班时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateSerializer.class)
    private LocalDate targetClazzStartDate ;
    /**
     * 转出班级是否升级
     */
    private Boolean upgradeable ;
}
